
<div class="indexWidth">
    <button type="button" class="btn btn-info mainButtonRight"><a
            href="javascript:takeout.openMenu('${ctxPath!}/musicbg/list', null)" class="mianAcolor">返回</a></button>

    <div class="sectionTitle">
        背景音乐管理
        <hr>
    </div>
<form id="newsForm" name="form1" action="${ctxPath!}/musicbg/save" method="POST" class="form-horizontal" enctype="multipart/form-data">
    <input type="hidden" id="id" name="musicbg.id" value="${musicbg.id!}"/>
    <div id="tab" class="btn-group" data-toggle="buttons-radio" style="margin-left: 100px">
        <a href="#htmlimage" class="btn btn-large btn-info  active" data-toggle="tab">填写网址</a>
        <a href="#fileimage" class="btn btn-large btn-info" data-toggle="tab">选择文件</a>
    </div>
    <div class="tab-content" style="margin-top: 10px">

        <div class="tab-pane active" id="htmlimage">
            <div class="articleFormLabel"  style="display: flex;align-items:center;" >
                <label class="mainSetConsistentWidth">背景音乐：</label>
                <input type="text" name="musicbg.url" target="_blank"     style="margin-top: 4px" class="mainSetWidth" value="${musicbg.url!}" placeholder="" />
            </div>
        </div>
        <div class="tab-pane " id="fileimage">
            <div class="articleFormLabel"   style="display: flex;align-items:center;">
                <label class="mainSetConsistentWidth">背景音乐：</label>
                <input type="file" id="grouping" name="url" class="mainSetWidth" >
                <a href="${musicbg.url!}" target="_blank" style="margin-left: 10px;">查看</a>
            </div>
        </div>
    </div>


    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">标题：</label>
        <input type="text" id="According" name="musicbg.title" class="mainSetWidth" value="${musicbg.title!}" placeholder=""  valid="vtext" validname="标题"/>
    </div>
    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">节日类别：</label>
        <#oneToManyTag val="${musicbg.festival_type!}" type="select" table="category" columnName="name" class="mainSetWidth"
                pname="musicbg.festival_type" defaultNumber="70" whereSel="parentid" whereArgs="7"></#oneToManyTag>
    </div>

    <div class="form-group">
        <button style="margin-left: 100px;width:95px;" class="btn btn-info articleFormButton" type="button"
                onclick="oper.save()">保存
        </button>
    </div>

    <script type="text/javascript">
        function nan(t){
            t.value=t.value.replace(/[^\d]/g,"");
        }
        var oper = {
            save:function(){
                if(!validForm()) {
                    return false;
                }
                takeout.ajaxFormMainPanel('newsForm')
                return true;
            }
        };
    </script>
    <script>
        KindEditor.ready(function(K) {
            window.editor = K.create('#news_content', {
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {
                        self.sync();
                        K('form[name=form1]')[0].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                        K('form[name=form1]')[0].submit();
                    });
                },
                afterBlur: function () { this.sync(); },
                allowImageUpload : true,
                uploadJson : '${ctxPath!}/news/uplodImg'
            });
        });
    </script>
</form>